import request from 'network/index'

//发布朋友圈的文本
export function publicTextDynamic(data) {
  return request({
    method: "post",
    url: "/dynamic",
    data
  })
}


//查询生活圈的数据
export function getAllDynamic(params) {
  return request({
    url: "/dynamic/all",
    params
  })
}

//判断当前登录的人是否点过这个朋友圈的赞
export function isDianZan(data) {
  return request({
    method: "post",
    url: "/dynamic/islike",
    data
  })
}

//点赞朋友圈
export function dianZanDynamic(data) {
  return request({
    method: "post",
    url: "/dynamic/tolike",
    data
  })
}

//取消点赞
export function cancleDianZanDynamic(data) {
  return request({
    method: "delete",
    url: "/dynamic/tolike",
    data
  })
}

//查看动态评论
export function getDynamicCooment(id){
  return request({
    url:"/dynamic/comment/" + id
  })
}

//添加动态评论
export function addDynamicCooment(data){
  return request({
    method: "post",
    url: "/dynamic/comment",
    data
  })
}

